{template "content","header"}
<div class="layui-warp">
  {pc:get sql="select a.*,b.id,b.pictureurls from phpcms_picture as a left join phpcms_picture_data as b on a.id=b.id where a.status = 99 order by inputtime desc" num="30"}
  <div id="masonry" class="container-fluid">
    {loop $data $r}
    <div class="layui-box">
      <div class="layui-actions">
        <a class="layui-thumb" href="{$r[url]}" target="_blank"><img lay-src="{$r[thumb]}?x-oss-process=style/midpic" alt="{$r[title]}" /></a>
        <div class="layui-infos">
          {php $enjoynum = isset($r['digg']) ? $r['digg'] : 0;}
          <div class="layui-digg"><i class="layui-heart"></i><span class="layui-badge">{$enjoynum}人喜欢</span></div>
          <div class="layui-type"><i class="layui-icon">&#xe857;</i><span class="layui-badge"><a href="{$CATEGORYS[$r[catid]][url]}" target="_blank">{$CATEGORYS[$r[catid]][catname]}</a></span></div>
        </div>  
      </div>
      <div class="layui-stats">
        <div class="layui-tips">
          {php $picnum = count(json_decode($r[pictureurls], true));}
          <div class="layui-piccount"><i class="layui-icon">&#xe64a;</i><span class="layui-badge layui-count" data-num="{$picnum}">{$picnum}P</span></div>
          <div class="layui-posttime"><i class="layui-icon">&#xe609;</i><span class="layui-badge layui-date">{date("Y-m-d", $r[inputtime])}</span></div>
        </div>
        <div class="layui-title">
          <h2><a href="{$r[url]}" title="{$r[title]}" target="_blank">{$r[title]}</a></h2>
        </div>
      </div>
    </div>
    {/loop}
  </div>
  {/pc}
</div>
<div class="layui-link">
  <div class="layui-linkbar">
	<div class="layui-badge"><i class="layui-icon">&#xe64c;</i><h3>友情链接</h3></div>
  </div>
  {pc:get sql="select * from phpcms_link where passed=1 order by listorder|addtime asc" num="20"}
  <div class="layui-linklist">
  	{loop $data $r}
  	<a href="{$r[url]}" target="_blank">{$r[name]}</a>
  	{/loop}
  </div>
  {/pc}
</div>
<script type="text/javascript" src="{LAYUI_PATH}index.js"></script>
<script type="text/javascript" src="{LAYUI_PATH}uaredirect.js"></script>
<script type="text/javascript">uaredirect("http://m.chunmeitu.com/");</script>
{template "content","footer"}
